package com.llc925.cst.myrecycleview_1.model;




import com.llc925.cst.myrecycleview_1.service.UserService;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/4/19.
 */

public class UserModel {
    private Retrofit retrofit;

    public UserModel() {
        retrofit = new Retrofit.Builder()
                .baseUrl("http://60.205.189.39/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }

    public Call login(String username, String userpass) {
        UserService userService = retrofit.create(UserService.class);
        return userService.getuserLogin(username, userpass);
    }

    public Call register(String username, String userpass, String mobilenum, String address) {
        UserService userService = retrofit.create(UserService.class);
        return userService.getuserRegister(username, userpass, mobilenum, address);
    }

}
